<template>
  <div class="item" data-type="table" v-bind:class="[('w'+obj.property.selfWidth)]">
      <div class="i6d6 hd">
        <label class="tit">{{obj.property.title}}</label>
        <span class="required" v-show="obj.property.required">*</span>
        <span class="block muted">{{obj.property.intro}}</span>
        <v-handle v-bind:handle="obj.handle"></v-handle>
      </div>
      <div class="i6d6 bd">
        <div class="tb">
          <table> 
            <tr>
              <td>&nbsp;</td>
              <td v-for="(col,i) in obj.property.table.cols" align="center">{{col.label}}</td>
            </tr>
              <tr v-for="(row,i) in obj.property.table.rows">
                <td :style="{width:obj.property.table.titleWidth+'%'}">{{row.label}}</td>
                  <td v-for="(col,i) in obj.property.table.cols" align="center">
                    <div class="el-input">
                      <input v-bind:type="obj.property.table.type" v-bind:name="row.label" v-bind:value="obj.property.table.type=='radio'||obj.property.table.type=='checkbox'?col.label:''"/>
                    </div>
                  </td>
              </tr>
          </table>
        </div>
      </div>
    </div>
</template>
<!--<input v-bind:type="obj.property.table.type" v-bind:name="row.label" v-bind:value="obj.property.table.type=='radio'||obj.property.table.type=='checkbox'?col.label:''"/>-->
<script>
export default {
  props: ['obj']
}
</script>
